# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-zope-location
pkgver=4.3
pkgrel=3
pkgdesc="Special objects that have a structural location"
arch=('any')
url="https://github.com/zopefoundation/zope.location"
license=('ZPL')
depends=('python-setuptools' 'python-zope-interface' 'python-zope-schema' 'python-zope-proxy')
checkdepends=('python-zope-testrunner' 'python-zope-copy' 'python-zope-configuration' 'python-zope-component')
source=("$pkgname-$pkgver.tar.gz::https://github.com/zopefoundation/zope.location/archive/$pkgver.tar.gz")
sha512sums=('af6188ac877f48a2955888fda10e9be9c7d4496184b5b22dff6a62674b4ed31b6bc84bdb7434f75b313679b9e0706cf9025591f8106f8c4f53c3a27ee74c13b6')

build() {
  cd "$srcdir"/zope.location-$pkgver
  python setup.py build
}

check() {
  cd "$srcdir"/zope.location-$pkgver
  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python -m zope.testrunner --test-path=src || echo "Tests failed"
}

package() {
  cd zope.location-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
